package cbbx_sm.decision_maker.search;

import org.junit.Test;


public class FindExample3SecLookaheadUP {

	@Test public void findExample(){
		double[] state = {0,0,0,0};
        double[] possibleValues = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1};
        EventFactory.createEventInstance(possibleValues);
		for (double motionmotion=0.1; motionmotion<1; motionmotion+=0.1){
			for (double motionnomotion=0.1; motionnomotion<1; motionnomotion+=0.1){
			  WorldStateTransition wst = new WorldStateTransition(state.length, motionmotion, motionnomotion);
			  ScheduleConfigurationNode root = new ScheduleConfigurationNode(
					null, state, null, wst, 0,1,0);
			  TreeLookAhead.growTree(root, wst, 2);
			  if (root.getBestNextAction().compareTo(Schedules.UP)==0){
				System.out.println(motionmotion+"\t"+motionnomotion);
					//System.exit(1);
			  }
			}
		}
	}
}
